package example02;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author liangbaigao
 * @Date 2023/9/28 10:40
 */
public class ShallowCloning implements Cloneable{

    public List<String> list = new ArrayList<String>();

    @Override
    public ShallowCloning clone() {
        try {
            System.out.println("对象浅克隆成功");
            return (ShallowCloning) super.clone();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
